package com.ymttest.common.enums;

/**
 * 渠道枚举
 */
public enum DistributorEnum {
	/**
	 * 洋码头
	 */
	YMT(1),
	/**
	 * 京东
	 */
	JD(2),
	/**
	 * 淘常州
	 */
	TCZ(3);

	private int intValue;
	private static java.util.HashMap<Integer, DistributorEnum> mappings;

	private synchronized static java.util.HashMap<Integer, DistributorEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, DistributorEnum>();
		}
		return mappings;
	}

	private DistributorEnum(int value) {
		intValue = value;
		DistributorEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static DistributorEnum forValue(int value) {
		return getMappings().get(value);
	}
}